package day10;

/**
 * @author oldliu
 * @since 1.0
 */
public class Thread2 implements Runnable {
    @Override
    public void run() {
        for(int i=1;i<=30;i++){
            System.out.println(Thread.currentThread().getName()+"打印了"+i);
        }
    }

    public static void main(String[] args) {
        for(int i=1;i<=4;i++){
            Thread2 th=new Thread2();
           Thread th2=new Thread(th,"线程"+i);
           th2.start();
        }
    }
}
